package com.py.inrejected.mapper;

import java.util.List;
import java.util.Map;

import com.py.inrejected.domain.OdInRejected;
import com.py.inrejected.domain.OdRejectedDetails;
import com.py.inrejected.domain.SysUser;
import com.py.inrejected.vo.OdPurchaseDetails;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.apache.ibatis.annotations.Param;

/**
 * 进货退货Mapper接口
 * 
 * @author 童佳
 * @date 2024-12-05
 */
public interface OdInRejectedMapper 
{
    /**
     * 查询进货退货
     * 
     * @param prId 进货退货主键
     * @return 进货退货
     */
    public OdInRejected selectOdInRejectedByPrId(Integer prId);

    /**
     * 查询进货退货列表
     * 
     * @param odInRejected 进货退货
     * @return 进货退货集合
     */
    public List<OdInRejected> selectOdInRejectedList(OdInRejected odInRejected);

    List<OdRejectedDetails> selectOdRejectedDetailsList(OdRejectedDetails odRejectedDetails);


    /**
     * 新增进货退货
     * 
     * @param odInRejected 进货退货
     * @return 结果
     */
    public int insertOdInRejected(OdInRejected odInRejected);

    /**
     * 修改进货退货
     * 
     * @param odInRejected 进货退货
     * @return 结果
     */
    public int updateOdInRejected(OdInRejected odInRejected);

    /**
     * 删除进货退货
     * 
     * @param prId 进货退货主键
     * @return 结果
     */
    public int deleteOdInRejectedByPrId(Integer prId);

    /**
     * 批量删除进货退货
     * 
     * @param prIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOdInRejectedByPrIds(Integer[] prIds);

    /**
     * 批量删除${subTable.functionName}
     * 
     * @param prCode 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOdRejectedDetailsByPrCodes(String [] prCode);
    
    /**
     * 批量新增${subTable.functionName}
     * 
     * @param odRejectedDetailsList ${subTable.functionName}列表
     * @return 结果
     */
    public int batchOdRejectedDetails(List<OdRejectedDetails> odRejectedDetailsList);
    

    /**
     * 通过进货退货主键删除${subTable.functionName}信息
     * 
     * @param prId 进货退货ID
     * @return 结果
     */
    public int deleteOdRejectedDetailsByPrCode(String prCode);
    int deleteDetailsByPrCode(@Param("prCode") String prCode);

    SysUser selectBySysUserName(@Param("userName") String userName );

    int checkById(Map<String,Object> map);

    int revokeById(@Param("prId") Integer prId);

    int colseById(@Param("prId") Integer prId);

    int updateRejectedByCode(@Param("num") Integer num, @Param("prCode") String prCode, @Param("productCode") String productCode);

    int updateRejectedNumByCode(@Param("num") Integer num,@Param("prCode") String prCode);

    int selectByCode(@Param("phCode") String phCode);
}
